{% extends "base.html" %}
{% load crispy_forms_tags %}

{% block title %}登录 - 在线跑批系统{% endblock %}

{% block content %}
<div class="row justify-content-center mt-5">
    <div class="col-md-6 col-lg-4">
        <div class="card shadow-sm">
            <div class="card-header bg-primary text-white text-center">
                <h4 class="mb-0">在线跑批系统</h4>
            </div>
            <div class="card-body p-4">
                <h5 class="card-title text-center mb-4">用户登录</h5>
                
                {% if messages %}
                    {% for message in messages %}
                        <div class="alert alert-{{ message.tags }} alert-dismissible fade show" role="alert">
                            {{ message }}
                            <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
                        </div>
                    {% endfor %}
                {% endif %}
                
                <form method="post">
                    {% csrf_token %}
                    {{ form|crispy }}
                </form>
                
                <div class="mt-3 text-center text-muted">
                    <p>默认管理员账号: admin</p>
                    <p>默认密码: 123QWE</p>
                </div>
            </div>
        </div>
    </div>
</div>
{% endblock %}
